<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="StyleSheet" type="text/css" href="/tpa/admin.css">
<script type="text/javascript" src="/lib/js/jquery.js"></script>
<script type="text/javascript" src="/lib/js/jquery.ui.js"></script>
<style type="text/css">
   form.welcom_search {
      margin:10px 0 20px 30px;
      padding:15px 20px;
      width:400px;
      float:left;
   }
   div.system_info {
      width:auto;
      float:right;
      padding:20px;
   }
   div.search_result {
      border:1px solid #DDD;
      margin:20px;
      padding:10px;
   }
   div.search_result span {
      display:block;
      margin:5px 0;
   }
</style>
</head>
<body>
   {%if !empty($server_missmatch_config)%}
   <div style="padding:30px 10px 0 10px;">
      <div class="warn">{%$TR->error->server_configuration%}:</div>
      <div>
      {%foreach from=$server_missmatch_config item='v' key='k'%}
         {%$k%} = {%$v%}<br />
      {%/foreach%}
      </div>
   </div>
   {%/if%}

   <div>
   <form action="/admin/welcome.php" method="post" class="welcom_search">
      <label for="search">{%$TR->meccano->welcom_search%}:</label><br />
      <input type="text" name="search" id="search" />
      <input type="submit" value="{%$TR->meccano->search%}" />
   </form>
  <div class="system_info notice">
     Meccano version: <b class="warn">{%$CONFIG->version%}</b><br />
     Smarty TS version: <b class="warn">{%$smarty.version%}</b><br />
     jQuery version: <b class="warn"><script type="text/javascript">document.write(jQuery.fn.jquery);</script></b><br />
     jQuery UI version: <b class="warn"><script type="text/javascript">document.write(jQuery.ui.version);</script></b><br />
  </div>
   <div class="clear"></div>
   </div>

   {%if $data%}
   <div class="search_result">
   {%foreach from=$data item='result' name='i'%}
   <span id="a{%$result.id%}">
      {%$smarty.foreach.i.iteration%}.
      {%assign var='path' value=$categories[$result.cat]->path()%}
      <b>{%if $path%}
      {%foreach from=$path|@array_reverse item='v'%}
         {%$v->title%} -
      {%/foreach%}
      {%/if%}</b>
      <a href="/admin/article/{%$result.id%}.html" onclick="getFound({%$result.cat%});">{%$result.title%}</a>
      <a href="{%$categories[$result.cat]->url%}{%$result.id%}.html" target="_blank"><img src="/tpa/img/16/link.png" alt="" /></a>
      &nbsp; &nbsp;<a href="javascript:void(0);" onclick="DeleteArticle({%$result.id%});"><img src="/tpa/img/16/delete.gif" /></a>
   </span>
   {%/foreach%}
   </div>
   <script type="text/javascript">
      function getFound(cat)
      {
      }
      function DeleteArticle(id)
      {
         if(parent.frames['tree'].cMenu.deleteNode('a'+id))
         {
            $('#a'+id).remove();
         }
      }
   </script>
   {%/if%}

</body>
</html>